<include file="public/header" />
<include file="public/left" />
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<style>
    .flexigrid .hDiv th div, .flexigrid .bDiv td div, .colCopy div{height: auto}
</style>
<div class="page">
    <div class="flexigrid">

        <div class="mDiv">
            <div class="ftitle">
                <h3>司机提现列表</h3>
                <h5>(共{$count}条记录)</h5>
            </div>
            <div title="刷新数据" class="pReload"><i class="fa fa-refresh"></i></div>
            <form class="navbar-form form-inline" action="" method="get">
                <div class="sDiv">
                    <div class="sDiv2">

                        <select name="status" class="select">
                            <option value="">全部状态</option>
                            <option value="0" <eq name="status" value="0">selected </eq>>待审核</option>
                            <option value="1" <eq name="status" value="1">selected </eq>>已通过</option>
                            <option value="-1" <eq name="status" value="-1">selected </eq>>不通过</option>
                        </select>
                        <input type="text" class="qsbox" name="keyword" placeholder="可搜索昵称或手机号码" value="{$keyword}">
                        <input  class="btn"type="submit" value="搜索">
                    </div>
                </div>
            </form>
        </div>

        <div class="hDiv">
            <div class="hDivBox">
                <table cellspacing="0" cellpadding="0">
                    <thead>
                    <tr>

                        <th class="sign" axis="col0">
                            <div style="width: 24px;"><i class="ico-check"></i></div>
                        </th>
                        <th align="left" abbr="article_title" axis="col3" class="">
                            <div style="text-align: left; width: 50px;" class="">ID</div>
                        </th>
                        <th align="left" abbr="ac_id" axis="col4" class="">
                            <div style="text-align: left; width: 200px;" class="">用户资料</div></th>
                        <th align="left" abbr="ac_id" axis="col4" class="">
                            <div style="text-align: left; width: 100px;" class="">手机号码</div></th>
                        <th align="left" abbr="ac_id" axis="col4" class="">
                            <div style="text-align: left; width: 220px;" class="">银行资料</div></th>
                        <th align="left" abbr="ac_id" axis="col4" class="">
                            <div style="text-align: left; width: 120px;" class="">金额</div></th>
                        <th align="left" abbr="ac_id" axis="col4" class="">
                            <div style="text-align: left; width: 80px;" class="">状态</div></th>
                        <th align="left" abbr="ac_id" axis="col4" class="">
                            <div style="text-align: left; width: 120px;" class="">申请时间</div></th>
                        <th align="left" abbr="ac_id" axis="col4" class="">
                            <div style="text-align: left; width: 120px;" class="">操作时间</div></th>
                        <th align="center" axis="col1" class="handle">
                            <div style="text-align: center; width: 150px;">操作</div>
                        </th>
                        <th style="width:100%" axis="col7">
                            <div></div>
                        </th>
                    </tr>
                    </thead>
                </table>
            </div>
        </div>
        <div class="bDiv" style="height: auto;">
            <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
                <table>
                    <tbody>
                    <foreach name="list" item="vo" key="k" >
                        <tr>
                            <td class="sign">
                                <div style="width: 24px;"><i class="ico-check"></i></div>
                            </td>
                            <td align="left" class="">
                                <div style="text-align: left; width: 50px;">{$vo.id}</div>
                            </td>
                            <td align="left" class="">
                                <div style="text-align: left; width: 200px;">{$vo.nickname}</div>
                            </td>
                            <td align="left" class="">
                                <div style="text-align: left; width: 100px;">{$vo.mobile}</div>
                            </td>
                            <td align="left" class="">
                                <div style="text-align: left; width:220px;">{$vo.bank} <br> {$vo.card_num} <br>{$vo.name}</div>
                            </td>
                            <td align="left" class="">
                                <div style="text-align: left; width: 120px;">提现金额：{$vo.money}<br>手续费：{$vo.poundage}<br>应打款：{$vo.paid}</div>
                            </td>
                            <td align="left" class="">
                                <div style="text-align: left; width: 80px;"><switch name="vo.status">
                                    <case value="0"><span style="color: red">待审核</span></case>
                                    <case value="1"><span style="color: green">已通过</span></case>
                                    <case value="-1"><span style="color: #ccc">不通过</span></case>
                                </switch></div>
                            </td>
                            <td align="left" class="">
                                <div style="text-align: left; width: 120px;">{$vo.create_time|date="Y-m-d H:i:s",###}</div>
                            </td>
                            <td align="left" class="">
                                <div style="text-align: left; width: 120px;"><gt name="vo.check_time" value="0">{$vo.check_time|date="Y-m-d H:i:s",###}</gt></div>
                            </td>
                            <td align="center" class="handle">
                                <div style="text-align: center; width: 170px; max-width:170px;">
                                    <eq name="$vo['status']" value='0'>
                                        <a class="btn red"  href="javascript:void(0)" data-url="{:url('Withdrawals/driver_check')}"  data-status="1"  data-name="确认已打款？" data-id="{$vo.id}" onclick="blackfun(this)">确定打款</a>
                                        <a class="btn red"  href="javascript:void(0)" data-url="{:url('Withdrawals/driver_check')}"  data-status="-1" data-name="确认不同意打款?"  data-id="{$vo.id}"  onclick="blackfun(this)">不通过审核</a>
                                        <a class="btn red" data-url="{:url('Withdrawals/transaction_query')}" onclick="query(this)" href="javascript:void(0)" sn="{$vo.req_sn}">查看交易结果</a>
                                    </eq>
                                </div>
                            </td>
                            <td align="" class="" style="width: 100%;">
                                <div>&nbsp;</div>
                            </td>
                        </tr>
                    </foreach>
                    </tbody>
                </table>
            </div>
            <div class="iDiv" style="display: none;"></div>
        </div>
        {$list->render()}
        <!--分页位置-->
    </div>
</div>
<script>
    $(document).ready(function(){
        // 点击刷新数据
        $('.pReload').click(function(){
            location.href = location.href;
        });
    });
    function blackfun(obj) {
        // 删除按钮
        var confirm=$(obj).attr('data-name');
        layer.confirm(confirm, {
            btn: ['确定', '取消'] //按钮
        }, function () {
            $.post(
                    $(obj).attr('data-url'),
                    {id:$(obj).attr('data-id'),status:$(obj).attr('data-status')},
                    function (data) {
                        if (data.code == 1) {
                            var index = layer.alert(data.msg, {
                                skin: '' //样式类名
                                ,closeBtn: 0
                            }, function(){
                                window.location.reload();
                            });
                        } else {
                            layer.alert(data.msg, {icon: 2});  //alert('删除失败');
                        }
                    }
            )
        }, function () {
        });
    }
    function query(obj){
        $.post(
                $(obj).attr('data-url'),
                {transaction_query:$(obj).attr('sn')},
                function (data) {

                }
        )
    }
</script>
</body>
</html>
</html>